Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 68257a441ff1029054378185b09f4b61020e9d3e


Parents : e69da2e
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-01-22T09:44:03+01:00

Set transfer limit on reverse auto-peer

Changes

1 files changed, 6 insertions(+), 1 deletions(-)


Diff

diff --git a/LXMF/LXMRouter.py b/LXMF/LXMRouter.py
index bfe863d..5465356 100644
--- a/LXMF/LXMRouter.py
+++ b/LXMF/LXMRouter.py
@@ -1839,7 +1839,12 @@ class LXMRouter:
if not remote_hash in self.peers:
if self.autopeer and RNS.Transport.hops_to(remote_hash) <= self.autopeer_maxdepth:
- self.peer(remote_hash, remote_timebase)
+ # TODO: Query cache for an announce and get propagation
+ # transfer limit from that. For now, initialise it to a
+ # sane default value, and wait for an announce to arrive
+ # that will update the peering config to the actual limit.
+ propagation_transfer_limit = LXMRouter.PROPAGATION_LIMIT//4
+ self.peer(remote_hash, remote_timebase, propagation_transfer_limit)
else:
remote_str = f"peer {remote_str}"


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────